remove commas from string python

227

Python How To Remove Commas From String -

import re

my_string="Python, How To, Netherlands"
print("Original String is:")
print(my_string)

transformed_string=re.sub(",","",my_string)
print("Transformed String is:")
print(transformed_string)

Comments

Submit
0 Comments